/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package my.algorithms.mcorrea;

/**
 *
 * @author mcorrea
 */
public class ReserveString {
	
	public static void main(String args[]){
	
		String str = "reverse me!!";
		System.out.println(  reverse(str) );
	
	}
	
	public static String reverse(String str){
		if(str.length()!=0){
			return  str.substring(str.length()-1) + reverse(str.substring(0, str.length()-1));
		}
		return "";
		
	}
	
}
